// import React from 'react'

// import request from '@/utils/request'
// // 其他引入文件
// export default class Index extends React.Component{
//     constructor(props) {
//         super(props)
//         request.get('/article/getAll').then(res => {
//             console.log(res)
//         })
//     }
    
//     render(){
//         // 模板
//     }
// }

import { useSelector, useDispatch } from 'react-redux'
import { decrement, increment } from '@/store/modules/counterSlice'

import { DatePicker } from 'antd';
 

export default function Index(){
    const count = useSelector(state => state.counter.value)
    const dispatch = useDispatch()
    return (
        <div>
            <div>
                <button
                    aria-label="Increment value"
                    onClick={() => dispatch(increment())}
                >
                    Increment
                </button>
                <span>{count}</span>
                <button
                    aria-label="Decrement value"
                    onClick={() => dispatch(decrement())}
                >
                    Decrement
                </button>
            </div>
            <DatePicker />
        </div>
    )
}